FROM php:5.6-fpm-stretch
ENV TIMEZONE Asia/Shanghai
ENV PHP_MEMORY_LIMIT 512M
ENV MAX_UPLOAD 50M
ENV PHP_MAX_FILE_UPLOAD 200
ENV PHP_MAX_POST 100M

COPY ./sources.list.stretch   /etc/apt/sources.list
COPY ./xdebug-2.5.0.tgz  /home/xdebug-2.5.0.tgz
COPY ./mongodb-1.5.2.tgz  /home/mongodb-1.5.2.tgz
RUN cd /home \
        && tar -zxf xdebug-2.5.0.tgz   \
        && cd xdebug-2.5.0  \
        && phpize \
        && ./configure --with-php-config=/usr/local/bin/php-config \
        && make && make install 
RUN cd  /home  \
        &&  tar -zxf mongodb-1.5.2.tgz \
        && cd mongodb-1.5.2 \
        && phpize \
        && ./configure --with-php-config=/usr/local/bin/php-config  \
        && make && make install
RUN   docker-php-ext-enable mongodb   xdebug 
RUN apt-get update
## mcrypt-dev  GD   依赖文件
RUN  apt-get install -y libmcrypt-dev \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng-dev  
## GD   
RUN docker-php-ext-install    gd pdo_mysql  mysql  mysqli

